<!doctype html>
<html>
<head>
    <title></title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="spreadjs culture" content="zh-cn" />
    
    <link href="gcjs/gcspread.sheets.excel2013white.9.40.20153.0.css" rel="stylesheet" />
    <script src="gcjs/jquery-1.8.2.min.js"></script>
    <script src="gcjs/gcspread.sheets.all.9.40.20153.0.min.js"></script>

      

    <style type="text/css">
        .demo-options, .option-row { 
            margin-top: 10px; 
        }
    
    </style>
    <script type="text/javascript">
    
        $(document).ready(function () {
            var spread = new GcSpread.Sheets.Spread(document.getElementById("ss"));

            $("#btnAddSheet").click(function () {
                spread.addSheet(spread.getSheetCount());
            });

            $("#btnRemoveSheet").click(function () {
                if(spread.getSheetCount() > 0){
                    spread.removeSheet(0)
                }
            });

            var spreadNS = GcSpread.Sheets;
            var sheet = spread.getSheet(0);
            sheet.isPaintSuspended(true);
            sheet.setValue(1, 1, '2014');
            sheet.setText(2, 2, '01/01/2014');
           
            sheet.isPaintSuspended(false);

            $("#btnClearSheets").click(function () {
                spread.clearSheets();
            });
        });
        
    </script>
</head>
<body>
    <div class="sample-turtorial">
        <div id="ss" style="width:100%; height:415px;border: 1px solid gray;"></div>
        <div class="demo-options">
	        <input type="button" value="Add sheet" id="btnAddSheet" />
            <input type="button" value="Remove sheet" id="btnRemoveSheet" />
            <input type="button" value="Remove all sheet" id="btnClearSheets" />
        </div>
    </div>
</body>
</html>
